
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title></title>
    <script src="https://unpkg.com/mqtt@3.0.0/dist/mqtt.min.js"></script>
  </head>
  <body>
    <div id="app"></div>
    <script>
        var client = mqtt.connect('mqtt://localhost',{
          clientId: 'cli_sub',
          port: 2002
        });

        client.subscribe("mqtt-test");

        client.on("message", function(topic, payload) {
            console.log(payload,"payload-----ss")
        });
        client.publish('mytest','ssssssss');

    </script>
  </body>
</html>
